;Assembler header file for Quit
;written by DefMod (Dec 31 2005) on Sat Dec 31 14:07:20 2005
;Jonathan Coxhead, jonathan@doves.demon.co.uk, 5 Sept 1995

        [       :LNOT: :DEF: Quit_Hdr
        GBLS    Quit_Hdr

        [       :LNOT: :DEF: Get_Types
        GBLS    Get_Types
        ]
        [       :LNOT: :DEF: Types_Hdr
Get_Types                       SETS    "GET oslib/Types.Hdr"
        |
Get_Types                       SETS    ""
        ]
        $Get_Types

        [       :LNOT: :DEF: Get_Toolbox
        GBLS    Get_Toolbox
        ]
        [       :LNOT: :DEF: Toolbox_Hdr
Get_Toolbox                     SETS    "GET oslib/Toolbox.Hdr"
        |
Get_Toolbox                     SETS    ""
        ]
        $Get_Toolbox

;Symbols for constants
Class_Quit                      *       &82A90
Quit_GenerateAboutToBeShown     *       &1
Quit_GenerateDialogueCompleted  *       &2
Quit_FileTypeIcon               *       &82A900
Quit_Quit                       *       &82A901
Quit_Cancel                     *       &82A902
Action_QuitAboutToBeShown       *       &82A90
Action_QuitQuit                 *       &82A91
Action_QuitDialogueCompleted    *       &82A92
Action_QuitCancel               *       &82A93

;Symbols for structure offsets and sizes
                                ^       0
                                #       Bits
Quit_Flags                      *       @

                                ^       0
Quit_Object_flags               #       Quit_Flags
Quit_Object_title               #       Toolbox_MsgReference
Quit_Object_title_limit         #       Int
Quit_Object_message             #       Toolbox_MsgReference
Quit_Object_message_limit       #       Int
Quit_Object_alternative_window_name #       Toolbox_StringReference
Quit_Object                     *       @

                                ^       0
Quit_ObjectTemplate             Toolbox_ResourceFileObject_MEMBERS
Quit_ObjectTemplate_objectflags #       Quit_Flags
Quit_ObjectTemplate_title       #       Toolbox_MsgReference
Quit_ObjectTemplate_title_limit #       Int
Quit_ObjectTemplate_message     #       Toolbox_MsgReference
Quit_ObjectTemplate_message_limit #       Int
Quit_ObjectTemplate_alternative_window_name #       Toolbox_StringReference
Quit_ObjectTemplate             *       @

Quit_Full                       *       OS_Coord

                                ^       0
Quit_ActionAboutToBeShown_tag   #       Toolbox_PositionTag
Quit_ActionAboutToBeShown_position *       @
Quit_ActionAboutToBeShown_position_top_left #       OS_Coord
                                ^       Quit_ActionAboutToBeShown_position
Quit_ActionAboutToBeShown_position_full #       Quit_Full
Quit_ActionAboutToBeShown       *       @

                                ^       0
Quit_ActionAboutToBeShownBlock  Toolbox_ActionHeader_MEMBERS
Quit_ActionAboutToBeShownBlock_tag #       Toolbox_PositionTag
Quit_ActionAboutToBeShownBlock_position *       @
Quit_ActionAboutToBeShownBlock_position_top_left #       OS_Coord
                                ^       Quit_ActionAboutToBeShownBlock_position
Quit_ActionAboutToBeShownBlock_position_full #       Quit_Full
Quit_ActionAboutToBeShownBlock  *       @

Quit_ActionQuitBlock            *       Toolbox_ActionHeaderBase

Quit_ActionDialogueCompletedBlock *       Toolbox_ActionHeaderBase

Quit_ActionCancelBlock          *       Toolbox_ActionHeaderBase


;Symbols for SWI's and SWI reason codes
XQuit_ClassSWI                  *       &A2A90
Quit_ClassSWI                   *       &82A90

XQuit_PostFilter                *       &A2A91
Quit_PostFilter                 *       &82A91

XQuit_PreFilter                 *       &A2A92
Quit_PreFilter                  *       &82A92

Quit_GetWindowID                *       &0
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = quit (Toolbox_O)
   ;  R2 = &0
   ;Exit
   ;  R0 = window (Toolbox_O)

Quit_SetMessage                 *       &1
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = quit (Toolbox_O)
   ;  R2 = &1
   ;  R3 -> message (String)

Quit_GetMessage                 *       &2
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = quit (Toolbox_O)
   ;  R2 = &2
   ;  R3 = buffer (pointer to String)
   ;  R4 = size (Int)
   ;Exit
   ;  R4 = used (Int)

Quit_SetTitle                   *       &3
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = quit (Toolbox_O)
   ;  R2 = &3
   ;  R3 -> title (String)

Quit_GetTitle                   *       &4
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = quit (Toolbox_O)
   ;  R2 = &4
   ;  R3 = buffer (pointer to String)
   ;  R4 = size (Int)
   ;Exit
   ;  R4 = used (Int)

        ]
        END
